package cn.lili.modules.member.client;

import cn.lili.modules.constant.ServiceConstant;
import cn.lili.modules.member.entity.dos.Union;
import cn.lili.modules.member.entity.dos.UnionLog;
import cn.lili.modules.member.fallback.UnionFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(path = "${server.servlet.context-path}", name = ServiceConstant.USER_SERVICE, contextId = "union", fallback = UnionFallback.class)
public interface UnionClient {
    @PostMapping("/feign/union/getList")
    List<Union> getList();


    @PostMapping("/feign/union/getListByIdList")
    List<Union> getListByIdList(@RequestBody List<String> unionIdList);

    @PostMapping("/feign/union/getListByChairmanIdList")
    List<Union> getListByChairmanIdList(@RequestBody List<String> chairmanIdList);

    @GetMapping("/feign/getListByFiled")
    List<Union> getListByFiled(@RequestParam String filed,@RequestParam String filedValue);

    @GetMapping("/feign/union/getById")
    Union getById (@RequestParam String id);
}
